<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>sj</title>
		<link rel="stylesheet" type="text/css" href="css/style.css"/>
		<style type="text/css">
			body{
				font-family: cursive;
			}
		</style>
	</head>
	<body>
		<script>
			var m = prompt("请输入金字塔层数");
			for(var i=0; i<m;i++){
				for(var p=0; p<m-i; p++){
					document.write("&nbsp");
				}
				for(var s=0; s<=i*2;s++){
					document.write("*");
				}
					document.write("<br>")
			}
		</script>
	</body>
</html>
